<template>
  <view class="custom-input">
    <u-input v-model="showValue" @change="hanldeChange"></u-input>
  </view>
</template>

<script lang="ts" setup>
import { computed, defineProps } from 'vue';
const props = defineProps({
  value: {
    type: [String, Number]
  }
})
const emit = defineEmits(['change'])
const showValue = computed({
  get() {
    console.log(props.value)
    return props.value
  },
  set(value:any) {
    emit('change', value)
  }
})
const hanldeChange = (value:any) => {
  emit('change', value)
}
</script>